home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / CHIP Kasım 1998.iso / emulators / gameboy / gameboy.exe / GB97.TXT < prev    next >
Text File  |  1997-07-01  |  17KB  |  416 lines

  1. ==========================================================================
  2.  
  3.                 =========================================
  4.                 GB97 Gameboy Emulator in 32 bit assembler
  5.                 =========================================
  6.  
  7. ==========================================================================
  8.  
  9. Released Builds :
  10.  
  11. 1.989 on 1st June 1997 :
  12.     First release build. Four carts don't work.
  13.  
  14. 2.160 on 3rd June 1997 :
  15.     Interim release.
  16.         Fix bug running under DOS rather than Win95, causing PMode
  17.                                              exception when a key pressed.
  18.         Added sweeps to sound & on/off fixed.
  19.         Added Autofire.
  20.         Added a hack to make Bubble Bobble 1 work properly.
  21.         Fixed (partially !) VBLANK Interrupt timing.
  22.         Supports 32k RAM Battery Backup Cartridges
  23.  
  24. 2.192 on 4th June 1997 :
  25.         Added Autofire On/Off & Messages. Created home page.
  26.  
  27. 2.320 on 5th June 1997:
  28.         Added Joystick support
  29.         Added Game Genie Cheat codes
  30.         Added Gameboy-like background for small screen
  31.         Stopped long-play hiss on Zelda 3
  32.  
  33. 2.368 on 6th June 1997:
  34.         Added Sprites prioritised by depth (not by position)
  35.  
  36. 2.426 on 9th June 1997:
  37.         Fixed sprite bug. (disappeared of Left hand side of screen)
  38.         Support for 4 button joysticks.
  39.  
  40. 2.447 on 9th June 1997:
  41.         Support for VGB Colour Configuration files (via a Translator)
  42.         Fixed Patrik Alexandersson's bug (Bart Simpson)
  43.  
  44. 2.524 on 9th June 1997:
  45.         First version with debugger released.
  46.  
  47. 2.604 on 11th June 1997:
  48.         Donkey Kong 95 & Hudson Hawk running
  49.  
  50. 2.732 on 12th June 1997:
  51.         In game Save & Load (8 per cartridge)
  52.         Use 256-colour bitmaps as background
  53.         Game Painting
  54.         Reset Button Added
  55.         Display Mode Toggle Key Added
  56.         Pause Button Added
  57.         Reversed default sprite order so Zelda IV map looks better.
  58.  
  59. 2.830 on 17th June 1997:
  60.         Fix for 'Frank Thornton Baseball' (VBI enabled when screen off)
  61.         Fix F7 Save bug in Super Mario Land 2 & 3 and others. [READ NOTE]
  62.         Config uses Default.G97 for its defaults (if it exists)
  63.         Added new sound code
  64.         Added support for 'Or Interrupt Byte' (fixed Waverace)
  65.         Added Icon (courtesy of Lee@lp1.demon.co.uk)
  66.         Fixed Window Fudge Bug (now removed from Config)
  67.         Changed Default Colours
  68.         Fixed extra ticks bug - now runs at about 59.5 fps
  69.  
  70. 2.860 on 18th June 1997:
  71.         Fix for 'Gauntlet' (starts in one player mode)
  72.         Minor fiddles for the sound code. (Pacman was quiet !)
  73.         Step Over now works properly.
  74.         Joystick uses BIOS rather than port I/O, seems to work better !
  75.         Added Autofix for : Altered Space, Asteroids, Bubble Bobble 1,
  76.                 Daedlian Opus,Doraemon 2,Frank Thomas Baseball,Hudson Hawk,
  77.                 Ren & Stimpy Vidiots, StreetFighter 2 and WaveRace
  78.  
  79. 2.887 on 20th June 1997:
  80.         Hudson Hawk now invokes internal fix correctly.
  81.         Early VBI Fix for Addams Family 1
  82.         Fixed Alleyway.
  83.         Fattened out the display font slightly
  84.         Note: There's some GUI code in this. If you click the mouse
  85.         you can move it around but it's still in development.
  86.  
  87. 2.890 on 20th June 1997:
  88.         Fixed R-Type 2
  89.         Speeded up the Joystick code.
  90.  
  91. 2.909 on 23rd June 1997:
  92.         Fixes for Alfred Chicken, Jeopardy, Hook, Robocop 2,
  93.         Super Hunchback, Obelix, Yogi Bear
  94.         Long filename for startup truncated.
  95.         Mouse code can be removed.
  96.         New background.
  97.         Snapshot Loads and Saves can be cancelled. (press RETURN)
  98.  
  99. 2.937 on 1st July 1997:
  100.         Added 360 x 144 display mode.
  101.         Fixed WWFKing/Ring
  102.         Added Jeff Frohwein's new opcode cycle timings
  103.  
  104. ==========================================================================
  105.  
  106. To run a game, type GB97 <filename> . The filename does not need to end
  107. in '.GB' but the program looks for a '.GB' image.
  108.  
  109. Example : GB97 ZELDA
  110.  
  111. There are no command line switches. All files should be in the same
  112. directory (it makes life easier !)
  113.  
  114. Keys
  115. ====
  116.  
  117. Most of these keys are redefinable (except accelerate and escape I think)
  118.  
  119. Arrow Keys              Joypad
  120. Ctrl                    A
  121. Alt                     B
  122. Select                  TAB
  123. Start                   RETURN
  124. Accelerate EMU          Keypad + (for getting past long title screens mainly !)
  125. Quit                    ESCAPE
  126. F1 and F2               Toggle Autofire on/off (must be set on in Configuration)
  127. Backspace               Reset
  128. /                       Switch Display Mode (between normal,stretch and tweak)
  129. P                       Pause
  130. C                       Colour the Game
  131. F5                      Load in saved game status
  132. F7                      Save game status
  133.  
  134. To activate the joystick, just press either button A or button B. If you
  135. have problems with the joystick, you can disable it (put 0 in joystick
  136. port address in CONFIG) and use JoyEmu (hopefully !) If anyone tries this
  137. can they let me know if it works.
  138.  
  139. Saving & Loading
  140. ================
  141.  
  142. Each cartridge can have up to 8 saved games (called xxx.Ga0 through xxx.Ga7)
  143. This seems to work ok on the dozen or so cartridges I have tested but it
  144. may not work universally,so I suggest you save twice in different slots
  145. to start with.... this is a bit of a monumental hack. Each file is
  146. over 64k in length so don't save too many ! 
  147.  
  148. Important : The first version of this did not work properly because in a
  149. major bout of dementia I forgot to save the Cartridge RAM !!! This is now
  150. saved with the image, so games which use this save method before which
  151. had battery backed Cartridge RAM in 2.732 will not reload properly into
  152. later versions. Sorry ! this was all my fault. THIS ONLY APPLIES TO GAMES
  153. WHICH HAD BATTERY BACKED CART RAM.
  154.  
  155. If you reload a game state and then exit the emulator saves the cartridge
  156. RAM to disk, as you would expect. However if you RESET a game, it reloads
  157. the cartridge RAM off disk, NOT from the saved image.
  158.  
  159. I will do my best to make sure that games saved with F7/F5 are backwards
  160. compatible.
  161.  
  162. Thanks to Patrik Alexanderson & Martin Sjostrand for help with these bugs.
  163.  
  164. Game Painting
  165. =============
  166.  
  167. Pressing 'C' allows you to enter the game colouring routine, which allows
  168. the 16 elements of the Gameboy display to be coloured. (They are background,
  169. window,sprite A and sprite B, each having 4 colours). You will see that
  170. the currently selected colour is flashing, the time when it is most 'on'
  171. is the current colour. The left & right arrows change the colour, and the
  172. up and down arrows change the selected element. Pressing RETURN continues
  173. the game. The advantage of this method is you can colour in the game while
  174. you are playing it !
  175.  
  176. Backgrounds
  177. ===========
  178.  
  179. Gameboy 97 can use any 256 colour 320x200 bitmap for its background. The
  180. default background used is 'Default.Bmp' - if a bitmap with the same
  181. name as the cartridge is found that will be used instead. It is possible
  182. to convert VGB's .GIF files to .BMP files using Paint Shop Pro, or Word
  183. (which is what I used !)
  184.  
  185. When creating a bitmap you can't use more than 192 colours of the 256
  186. available and it must be saved in 256 colour Bitmap form - 16 colour
  187. bitmaps are not supported.
  188.  
  189. Configuration
  190. =============
  191.  
  192. There is a configuration program which creates files of type '.G97' which
  193. contain information on how the emulator operates. There are three possible
  194. scenarios.
  195.  
  196. (i)     The image loaded has its own file (e.g. Zelda.G97) in which case that
  197.         is used.
  198.  
  199. (ii)    There is a default file used by everyone available, called default.g97
  200.  
  201. (iii)   There is no .G97 file, the defaults are used.
  202.  
  203. Generally, the defaults work fine. However, it is possible to redefine the
  204. game keys, which is quite useful, and change the colour scheme.
  205.  
  206. Configuration Options
  207. =====================
  208.  
  209. To start the configuration editor type CONFIG (for the default file) and
  210. CONFIG <image> (for an image specific file) - e.g. CONFIG ZELDA
  211.  
  212. Values are changed either using Space or by typing them in. To exit press
  213. ESCAPE.
  214.  
  215. For the keys, the scan code is displayed. To check possible scan codes
  216. run a ROM image in the emulator, and when you exit using ESCape hold down
  217. the F3 key. The program will display scan codes as a key is pressed. To
  218. exit this,press ESC. (Note: not all key combinations are possible due
  219. to the very simple keyboard handler)
  220.  
  221. DisplaySkipRate Set the number of frames per displayed frame. If this is
  222.                 1 then every frame is displayed. To speed up the emulation
  223.                 set this to a number greater than 1. 3 looks fine to me.
  224.  
  225. Sync On         Causes the emulation to run at about 59.5 fps (which is about
  226.                 right). Turning this off means the emulation will run as
  227.                 fast as it can. On Pentiums its silly !
  228.  
  229. Frame Rate      The number of frames displayed per PC Clock Tick. Increasing
  230.                 this speeds the game up.
  231.  
  232. No Int 60       Turning this on disables the keyboard interrupt in the
  233.                 gameboy. I added this late so I don't know how it will
  234.                 affect all the games, but it seems to be unnecessary. This
  235.                 will probably go in a later release, as I'm not sure
  236.                 exactly how this interrupt functions.
  237.  
  238. Adlib FM Port   The address of the ADLIB card (or soundblaster card adlib
  239.                 port). I think this is always $388 (904). If it doesn't
  240.                 work, find out where it is on your machine. (Try using
  241.                 System Properties in Windows 95). The sound code is
  242.                 bog standard Adlib stuff.
  243.  
  244. ModexxCycles    These three settings determine how many CPU cycles (tied to
  245.                 number of instructions) are done in the various bits of the
  246.                 window. If you have a slow machine, try reducing them (I
  247.                 recommend the Mode1x Cycle values). This can have
  248.                 unpredictable results depending on the game in question.
  249.                 (Try changing the Frame Skip Rate first). Occasionally
  250.                 increasing this (esp Mode00) will stop some games crashing,
  251.                 especially if they 'freeze' - e.g. Daedlian Opus.
  252.  
  253. NoRecursiveInts Stops interrupts being generated while the Z80 IFlag is
  254.                 disabled. Some games get stuck in a loop where the
  255.                 interrupt is recalled before its finished (e.g. Bubble
  256.                 Bobble 1). This is a useful hack.
  257.  
  258. FastSprites     Turning this on goes back to the old 'whole screen' sprite
  259.                 method, which is a bit quicker.
  260.  
  261. Hack            Hacks for various ROMs. These should be in individual
  262.                 configuration files only. These have only been tested on
  263.                 the ROM Images I have.
  264.  
  265.                         Hack#1 - Hudson Hawk
  266.  
  267.                 Hopefully, these should be removed as the emulation improves.
  268.  
  269. Barring disasters, .G97 files should always be backwards compatible. I
  270. will endeavour to make it so.
  271.  
  272. Speed
  273. =====
  274.  
  275. The development was done on a 586/133,Pentium 120 and a DX2/66 without any
  276. external cache. On all machines it was up to speed. If some games seem
  277. a bit slow,try setting the display frame skip to 3. With the turbo switch
  278. on the DX2/66 off (does this make it a DX2/25 or what ?) some games were
  279. still playable by hacking the Modexx cycle counts (reducing them). If you
  280. have a SX25 or something, please buy a DX2/66 ! It will work, albiet
  281. slowly, on a 386.
  282.  
  283. Colours
  284. =======
  285.  
  286. It came to my attention that there were some pretty good colour schemes
  287. available for VGB-DOS. It is now possible to use these in GB97.
  288.  
  289. The VGB Colour schemes are in .CFG files (e.g. Mario.Cfg). These need
  290. to be converted into Gameboy 97 equivalent files (.C97). Later versions
  291. of Gameboy 97 will allow these .C97 files to be edited in mid-game.
  292.  
  293. There is a program called trans which translates .CFG files to .C97 files
  294. To call it either use just TRANS which will translate everything in the
  295. current directory, or TRANS MARIO.CFG to convert Mario's .CFG file into
  296. a .C97 file. Loading an image in GB97 now automatically loads the .C97
  297. file in. I thought about incorporating the Colour information into the
  298. .G97 file but rejected it.
  299.  
  300. The Debugger
  301. ============
  302.  
  303. Gameboy 97 has a debugger built in. This is activated by pressing key
  304. F12 (by default, this can be changed)
  305.  
  306. The debugger has 3 windows. One displays the status of the CPU and
  307. some of the Gameboy Registers in page $FF, one displays code and one
  308. displays data.
  309.  
  310. To move around the code and data windows you can use the arrow keys (back
  311. or forward 8 bytes), or Page Up and Page Down (back and forward 64 bytes),
  312. or you can type the address you want directly in (the number keypad isn't
  313. available at the moment). By default, this moves around the memory
  314. pointer in the Code window. To move the pointer in the data window, hold
  315. down the Control key. (e.g. Ctrl+Down increments the data pointer by 8)
  316.  
  317. The current instruction is shown by a red '>' character in the code window.
  318.  
  319. Other keys used
  320. ===============
  321.  
  322.         F1..F4  Set breakpoint to the current code address (e.g. the
  323.                 value at the top of the screen). If the breakpoint is
  324.                 already there , it is cleared.
  325.  
  326.         F5      Runs the emulator until a breakpoint is encountered.
  327.  
  328.         F7      Single Step
  329.  
  330.         F8      Single Step (steps over subroutines either CALL or RST,
  331.                 they are executed in one keystroke)
  332.  
  333.         F10     Run the program, no breakpoints are tested. (Faster than
  334.                 F5 , it doesn't do the tests !)
  335.  
  336.         HOME    Move the code cursor to the program counter
  337.  
  338.         END     Move the data cursor to $FF00
  339.  
  340. What's missing for now
  341. ======================
  342.  
  343. Alternate large screen video mode which distorts the graphics less.
  344.     This will be a VGA hack mode so the old large screen will be retained
  345.     as this will work on all monitors.
  346.  
  347. Graphical User Inteface (GUI)
  348.     A better User interface to replace Config , which is basically a
  349.     quick botch job.
  350.         
  351. Games that don't work
  352. =====================
  353.  
  354. It has been mentioned that some games that don't work under VGB also don't
  355. work under GB97. It should be noted that the underlying code is completely
  356. different - even though it fits the same spec - interrupts etc. are done
  357. a different way. However, there are now several games which work under GB97
  358. which don't work under VGBDOS and I am working towards no failing
  359. games ! (slowly)
  360.  
  361. Fixing for several game is built in to Gameboy 97. If the program detects
  362. these games it automatically configures the emulator to run them. This can
  363. be turned off by setting 'Fix ROMs' to False.
  364.  
  365. If you have problems - if the screen contains junk try 'Fudge Window'. If
  366. the game locks try 'No Recursive Interrupts'. You can also try increasing
  367. the Mode00 cycle value or other values - this works for Daedlian Opus.
  368.  
  369. There is now a list of non-working games on the home page at
  370. http://users.aol.com/autismuk/gameboy.htm
  371.  
  372. Information
  373. ===========
  374.  
  375. This program should be distributed as a complete entity (the three executables
  376. and this documentation file).
  377.  
  378. This program is freeware. It cannot be distributed for monetary or other
  379. gain.
  380.  
  381. Finally
  382. =======
  383.  
  384. Please do NOT eMail me asking for the location of Gameboy ROM Images. Any
  385. such messages will be ignored. Bug reports, suggestions for improvements,
  386. compliments or money (errmmmm....) are welcome. I'd especially be open to
  387. 486/586/Pentium optimisation ideas, as I don't know a lot about this !
  388.  
  389. Paul Robson
  390. autismuk@aol.com
  391.  
  392. I would like to acknowledge the (unwitting !) help of the following.
  393. (in alphabetical order), for making available on the internet
  394. Gameboy Source & Code, and information about the machine itself.
  395.  
  396. Dr Pan of Anthrax for the Gameboy programming Documentation.
  397. Gameboy programming mailing list.
  398. Jeff Frohwein for the Gameboy Technical Website & his disassembler,
  399.                         the Game Genie information & lots of other stuff.
  400. Jens C. Restemeier for various tools & the GBDemo program & source.
  401. Harry Mulder for the Zoomar program & source.
  402. HeroZero for various programs & sources.
  403. Lee@jlp1.Demon.Co.Uk for the Gameboy 97 Icon.
  404. Marat Fayzullin for the Gameboy FAQ.
  405. Marat Fayzullin & Marcel DeKogel & others for VGB-DOS,especially FmFreqs.H !
  406. Matt Currie for the VGB Interrupt Demo source & code.
  407. Michael Kunstelj for the article on 386/Pentium optimisation.
  408. Michael Tippich for WDOSX, the free DOS Extender.
  409. Mike Mika for some useful documentation & "first gameboy program" code.
  410. Pascal Felber for the MBC Cartridge mapping information.
  411. Peter Quiring for documentation on setting up a keyboard handler.
  412. RTOONist for the new default background.
  413.  
  414. and lots of others who provided bits & bobs who I've forgotten about.
  415.  
  416.